﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Commons;
using RMSModel;
using RMSModel.Common;
using RMSModel.VMModels;

namespace IRMSService
{
    public interface ILoginService
    {
        ResultType<string> login(string account,string password,string guid,string code);

        void Logout(string account);
        // ResultType UpdateFile(HttpPostedFile file);
        ResultType ResetUserPassword(int id);
        //MemoryStream GetVerifyCode();
        #region 菜单
        ResultType<Dictionary<string, object>> GetAllMenuByUser(string id);

        ResultType<List<VMMenu>> GetAllMenu();
        /// <summary>
        /// 根据id 获取菜单
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ResultType<menu> GetMenuById(int id);
        /// <summary>
        /// 树结构获取菜单
        /// </summary>
        /// <returns></returns>
        List<TreeModel> GetAllMenuTree();
        ResultType AddMenu(menu m);

        ResultType UpdateMenu(menu m);

        ResultType DeleteMenu(List<menu>  m);
        #endregion
        #region 用户
        ResultType<List<VMUser>> GetAllUser();

        ResultType<VMUser> GetUserByUserId(int id);

        ResultType AddUser(user m);

        ResultType UpdateUser(user u);

        ResultType DeleteUser(List<user>  m);
        #endregion
        #region 角色
        ResultType<List<role>> GetAllRole();

        ResultType AddRole(VMRole m);
        ResultType<Dictionary<string, object>> GetRoleByRoleId(int id);
        ResultType UpdateRole(VMRole u);
        ResultType<List<TreeListModel>> GetAllMenuRole();
        ResultType DeleteRole(List<role>  m);
        #endregion

    }
}
